//
//  ProjectIncomeCostListViewController.swift
//  HuaYun
//
//  Created by enghou on 2019/1/16.
//  Copyright © 2019 xyxorigation. All rights reserved.
//

import UIKit

class ProjectIncomeCostListViewController: IncomeCostListViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    override func path(for name: String) -> String {
        return ProjectIncomeCostList
    }
    
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let proj = ProjectIncomCostDetailViewController()
        proj.title = "项目收入成本"
        let json = self.source[indexPath.row]
        proj.start = self.searchBar.text ?? ""
        proj.end = self.endDateField.text ?? ""
        proj.planId = json.contents?["id"]?.rawString() ?? ""
        self.push(destination: proj)
    }
    
}
